<div class="type-list" id="sele_man" style="display:none;">
	<div class="mantype_person" style="margin-bottom:1rem">
		<article class="data-wrap">
        	<form name="dataForm">
	        <h3>资料填写(暂时没有资料，稍后完善，可直接下一步)</h3>
	        <div class="data-input">
	            <section class="flex-justify">
	                <span>投资人</span>
	                <select name="typeperson">
	                    <option value="个人投资">个人投资</option>
	                    <option value="企业投资">企业投资</option>
	                    <option value="国内合资">国内合资</option>
	                </select>
	            </section>
	            <section class="flex-justify">
	                <span>投资人数</span>
	                <select name="investor">
	                    <option value="1">一位国内个人</option>
	                    <option value="2">两位及以上位国内个人</option>
	                </select>
	            </section>
	            <section class="flex-align">
	                <span>注册资本</span>
	                <input type="text" class="flex-1" name="investormon" placeholder="请输入注册资本"/>
	            </section>
	            <section class="flex-align">
	                <span>投资总额</span>
	                <input type="text" class="flex-1" name="investornum" placeholder="请输入投资总额"/>
	            </section>
	            <div name="mans_msg">
            		<div class="flex-justify" style="width:100%;height:0.75rem;background:#eee">
            			<div style="margin-left:0.3rem;font-weight:bold;">投资人信息</div>
            		</div>
		            <section class="flex-align">
		                <span>投资人姓名</span>
		                <input type="text" class="flex-1" name="investorname[]" placeholder="请输入投资人姓名"/>
		            </section>
		            <section class="flex-align">
		                <span>出资额</span>
		                <input type="text" class="flex-1" name="oneinvestormon[]" placeholder="请输入出资额"/>
		            </section>
		            <section class="flex-align proportion">
		                <span>出资比例</span>
		                <input type="text" class="flex-1" name="oneinvestorscale[]" placeholder="请输入出资比例，例如：30"/>
		                <span>%</span>
		            </section>
		            <section class="flex-align identity">
		                <span>身份证明</span>
		            </section>
		            <div class="identity-upload clearfix">
		                 <div style="background:url(__PUBLIC__/home/images/upload-positive.png) no-repeat center;background-size:contain;">
		                    <input type="file" id="investorimg" name="up_pic" onchange="uploadImg(this,upload_img_back)"/>
		                    <input type="hidden" name="investorimg[]" value="666"/>
		                </div>
		                <div style="background:url(__PUBLIC__/home/images/upload-other-side.png) no-repeat center;background-size:contain;">
		                    <input type="file" id="binvestorimg" name="up_pic" onchange="uploadImg(this,upload_img_back)"/>
		                    <input type="hidden" name="binvestorimg[]" value=""/>
		                </div>
		            </div>
	            </div>
	            <a href="javascript:void(0)" style="display:none;" name="add_investor" onclick="add_investor(this)" class="add-investor">添加投资人</a>
	        </div>
	   		<a href="javascript:void(0)" onclick="save_typeperson(this)" class="next-page">下一步</a>
            </form>
	    </article>
	</div>
	<div class="mantype_company" style="display:none;margin-bottom:1rem">
		<article class="data-wrap">
	        <form name="dataForm">
	        <h3>资料填写(暂时没有资料，稍后完善，可直接下一步)</h3>
	        <div class="data-input">
	            <section class="flex-justify">
	                <span>投资人</span>
	                <select name="typeperson">
	                    <option value="个人投资">个人投资</option>
	                    <option value="企业投资" selected>企业投资</option>
	                    <option value="国内合资">国内合资</option>
	                </select>
	            </section>
	            <section class="flex-justify">
	                <span>投资企业数</span>
	                <select name="firm">
	                    <option value="1">一家国内企业</option>
	                    <option value="2">两家及以上国内企业</option>
	                </select>
	            </section>
	            <section class="flex-align">
	                <span>注册资本</span>
	                <input type="text" class="flex-1" name="firmmon" placeholder="请输入注册资本"/>
	            </section>
	            <section class="flex-align">
	                <span>投资总额</span>
	                <input type="text" class="flex-1" name="firmnum" placeholder="请输入投资总额"/>
	            </section>
	            
	            <div name="firm">
            		<div class="flex-justify" style="width:100%;height:0.75rem;background:#eee">
            			<div style="margin-left:0.3rem;font-weight:bold;">投资企业信息</div>
            		</div>
		            <section class="flex-align">
		                <span>投资企业名称</span>
		                <input type="text" class="flex-1" name="firmname[]" placeholder="请输入投资企业名称"/>
		            </section>
		            <section class="flex-align">
		                <span>出资额</span>
		                <input type="text" class="flex-1" name="onefirmmon[]" placeholder="请输入注册资本"/>
		            </section>
		            <section class="flex-align proportion">
		                <span>出资比例</span>
		                <input type="text" class="flex-1" name="onefirmscale[]" placeholder="请输入出资比例，例如：30"/>
		                <span>%</span>
		            </section>
		            <section class="flex-align identity">
		                <span>证件照<i></i></span>
		            </section>
		            <div class="identity-upload clearfix">
		                <div style="background:url(__PUBLIC__/home/images/upload-positive.png) no-repeat center;background-size:contain;">
		                    <input type="file" id="firmimg" name="up_pic" onchange="uploadImg(this,upload_img_back)"/>
		                    <input type="hidden" name="firmimg[]" value=""/>
		                </div>
		                <!-- <div style="background:url('__PUBLIC__/home/images/upload-other-side.png') no-repeat center;background-size:contain;">
		                    <input type="file" onchange="uploadImg(this,upload_img_back)"/>
		                    <input type="hidden" name="firmimg" value=""/>
		                </div> -->
		            </div>
		        </div>
	            <a href="javascript:void(0)" style="display:none;" name="add_firm" onclick="add_firm(this)" class="add-investor">添加投资企业</a>
	        </div>
	        <a href="javascript:void(0)" onclick="save_typeperson(this)" class="next-page">下一步</a>
	        </form>
	    </article>
	</div>
	<div class="mantype_join" style="display:none;margin-bottom:1rem">
		<form name="dataForm">
		<article class="data-wrap">
	        <h3>资料填写(暂时没有资料，稍后完善，可直接下一步)</h3>
	        <div class="data-input">
	            <section class="flex-justify">
	                <span>投资人</span>
	                <select name="typeperson">
	                    <option value="个人投资">个人投资</option>
	                    <option value="企业投资">企业投资</option>
	                    <option value="国内合资" selected>国内合资</option>
	                </select>
	            </section>
        	    <section class="flex-align">
	                <span>注册资本</span>
	                <input type="text" class="flex-1" name="gfirmmon" placeholder="请输入注册资本"/>
	            </section>
	            <section class="flex-align">
	                <span>投资总额</span>
	                <input type="text" class="flex-1" name="gfirmnum" placeholder="请输入投资总额"/>
	            </section>
	            
	            <section class="flex-justify">
	                <span>投资人数</span>
	                <select name="gfirmpnum">
	                    <option value="1">一位国内个人</option>
	                    <option value="2">两家及以上国内个人</option>
	                </select>
	            </section>
				<div name="ginvestor">
            		<div class="flex-justify" style="width:100%;height:0.75rem;background:#eee">
            			<div style="margin-left:0.3rem;font-weight:bold;">投资人信息</div>
            		</div>
		            <section class="flex-align">
		                <span>投资人姓名</span>
		                <input type="text" class="flex-1" name="ginvestorname[]" placeholder="请输入投资人姓名"/>
		            </section>
		            <section class="flex-align">
		                <span>出资额</span>
		                <input type="text" class="flex-1" name="oneginvestormon[]" placeholder="请输入出资额"/>
		            </section>
		            <section class="flex-align proportion">
		                <span>出资比例</span>
		                <input type="text" class="flex-1" name="oneginvestorscale[]" placeholder="请输入出资比例，例如：30"/>
		                <span>%</span>
		            </section>
		            <section class="flex-align identity">
		                <span>身份证明</span>
		            </section>
		            <div class="identity-upload clearfix">
		                <div style="background:url(__PUBLIC__/home/images/upload-positive.png) no-repeat center;background-size:contain;">
		                    <input type="file" id="ginvestorimg" name="up_pic" onchange="uploadImg(this,upload_img_back)"/>
		                    <input type="hidden" name="ginvestorimg[]" value=""/>
		                </div>
		                <div style="background:url(__PUBLIC__/home/images/upload-other-side.png) no-repeat center;background-size:contain;">
		                    <input type="file" id="bginvestorimg" name="up_pic" onchange="uploadImg(this,upload_img_back)"/>
		                    <input type="hidden" name="bginvestorimg[]" value=""/>
		                </div>
		            </div>
		        </div>
	            <a href="javascript:void(0)" style="display:none;" name="add_ginvestor" onclick="add_ginvestor(this)" class="add-investor">添加投资人</a>
	        </div>
	    </article>
	    <article class="data-wrap">
	        <h3>资料填写</h3>
	        <div class="data-input">
	            <section class="flex-justify">
	                <span>投资企业数</span>
	                <select name="gfirmfnum">
	                    <option value="1">一家国内企业</option>
	                    <option value="2">两家及以上国内企业</option>
	                </select>
	            </section>
	            <div name="gfirm">
            		<div class="flex-justify" style="width:100%;height:0.75rem;background:#eee">
            			<div style="margin-left:0.3rem;font-weight:bold;">投资企业信息</div>
            		</div>
		            <section class="flex-align">
		                <span>投资企业名称</span>
		                <input type="text" class="flex-1" name="gfirmname[]" placeholder="请输入投资企业名称"/>
		            </section>
		            <section class="flex-align">
		                <span>出资额</span>
		                <input type="text" class="flex-1" name="onegfirmmon[]" placeholder="请输入出资额"/>
		            </section>
		            <section class="flex-align proportion">
		                <span>出资比例</span>
		                <input type="text" class="flex-1" name="onegfirmscale[]" placeholder="请输入出资比例，例如：30"/>
		                <span>%</span>
		            </section>
		            <section class="flex-align identity">
		                <span>证件照<i></i></span>
		            </section>
		            <div class="identity-upload clearfix">
		                <div style="background:url(__PUBLIC__/home/images/upload-positive.png) no-repeat center;background-size:contain;">
		                    <input type="file" id="gfirmimg" name="up_pic" onchange="uploadImg(this,upload_img_back)"/>
		                    <input type="hidden" name="gfirmimg[]" value=""/>
		                </div>
		            </div>
		        </div>
	            <a href="javascript:void(0)" style="display:none;" name="add_gfirm" onclick="add_gfirm(this)" class="add-investor">添加投资企业</a>
	        </div>
	        <a href="javascript:void(0)" onclick="save_typeperson(this)" class="next-page">下一步</a>
	    </article>
        </form>
	</div>
<script type="text/javascript">
function upload_img_back(data,id){
	if(data.status == '1'){
		$('#'+id).next('input').val(data.info)
		$('#'+id).parent().css({'background':'url('+data.info+') no-repeat center','background-size':'contain'});
	}else{
		layer.msg(data.info);
	}
	console.log(data,id)
}

$(function(){
	$('select[name=typeperson]').change(function(){
		if($(this).val() == '个人投资'){
			$('.mantype_person').show().siblings().hide();
		}else if($(this).val() == '企业投资'){
			$('.mantype_company').show().siblings().hide();
		}else if($(this).val() == '国内合资'){
			$('.mantype_join').show().siblings().hide();
		}
	});
	$('select[name=investor]').change(function(){
		if($(this).val() == '1'){
			$('a[name=add_investor]').hide();
			$('div[name=investor_add]').remove();
		}else{
			$('a[name=add_investor]').show();
		}
	});
	$('select[name=firm]').change(function(){
		if($(this).val() == '1'){
			$('a[name=add_firm]').hide();
			$('div[name=firm_add]').remove();
		}else{
			$('a[name=add_firm]').show();
		}
	});
	$('select[name=gfirmpnum]').change(function(){
		if($(this).val() == '1'){
			$('a[name=add_ginvestor]').hide();
			$('div[name=ginvestor_add]').remove();
		}else{
			$('a[name=add_ginvestor]').show();
		}
	});
	$('select[name=gfirmfnum]').change(function(){
		if($(this).val() == '1'){
			$('a[name=add_gfirm]').hide();
			$('div[name=gfirm_add]').remove();
		}else{
			$('a[name=add_gfirm]').show();
		}
	});

})
function save_typeperson(obj){
	$.post('{:U("saveGuideData")}',$(obj).parents('form[name=dataForm]').serializeArray(),function(data){
		console.log(data)
	});
	nextPage();
}
function add_investor(obj){
	var str = '';
	str += '<div name="investor_add">';
	str += '<div class="flex-justify" style="width:100%;height:0.75rem;background:#eee">';
	str += '<div style="margin-left:0.3rem;font-weight:bold;">投资人信息</div>';
	str += '<div style="width:0.75rem;text-align:center;color:#feb83d;font-size:0.65rem;" onclick="$(this).parents(\'div[name=investor_add]\').remove()">-</div>';
	str += '</div>';
	str += '<section class="flex-align">';
    str += '<span>投资人姓名</span>';
    str += '<input type="text" class="flex-1" name="investorname[]" placeholder="请输入投资人姓名"/>';
    str += '</section>';
    str += '<section class="flex-align">';
    str += '<span>出资额</span>';
    str += '<input type="text" class="flex-1" name="oneinvestormon[]" placeholder="请输入出资额"/>';
    str += '</section>';
    str += '<section class="flex-align proportion">';
    str += '<span>出资比例</span>';
    str += '<input type="text" class="flex-1" name="oneinvestorscale[]" placeholder="请输入出资比例，例如：30"/>';
    str += '<span>%</span>';
    str += '</section>';
    str += '<section class="flex-align identity">';
    str += '<span>身份证明</span>';
    str += '</section>';
    str += '<div class="identity-upload clearfix">';
    str += '<div style="background:url(__PUBLIC__/home/images/upload-positive.png) no-repeat center;background-size:contain;">';
    str += '<input type="file" id="investorimg'+Math.round(Math.random()*1000)+'" name="up_pic" onchange="uploadImg(this,upload_img_back)"/>';
    str += '<input type="hidden" name="investorimg[]" value=""/>';
    str += '</div>';
    str += '<div style="background:url(__PUBLIC__/home/images/upload-other-side.png) no-repeat center;background-size:contain;">';
    str += '<input type="file" id="binvestorimg'+Math.round(Math.random()*1000)+'" name="up_pic" onchange="uploadImg(this,upload_img_back)"/>';
    str += '<input type="hidden" name="binvestorimg[]" value=""/>';
    str += '</div>';
    str += '</div>';
    str += '</div>';
    $(obj).before(str)
}
function add_firm(obj){
	var str = '';
	str += '<div name="firm_add">';
	str += '<div class="flex-justify" style="width:100%;height:0.75rem;background:#eee">';
	str += '<div style="margin-left:0.3rem;font-weight:bold;">投资企业信息</div>';
	str += '<div style="width:0.75rem;text-align:center;color:#feb83d;font-size:0.65rem;" onclick="$(this).parents(\'div[name=firm_add]\').remove()">-</div>';
	str += '</div>';
    str += '<section class="flex-align">';
    str += '<span>投资企业名称</span>';
    str += '<input type="text" class="flex-1" name="firmname[]" placeholder="请输入投资企业名称"/>';
    str += '</section>';
    str += '<section class="flex-align">';
    str += '<span>出资额</span>';
    str += '<input type="text" class="flex-1" name="onefirmmon[]" placeholder="请输入注册资本"/>';
    str += '</section>';
    str += '<section class="flex-align proportion">';
    str += '<span>出资比例</span>';
    str += '<input type="text" class="flex-1" name="onefirmscale[]" placeholder="请输入出资比例，例如：30"/>';
    str += '<span>%</span>';
    str += '</section>';
    str += '<section class="flex-align identity">';
    str += '<span>证件照<i></i></span>';
    str += '</section>';
    str += '<div class="identity-upload clearfix">';
    str += '<div style="background:url(__PUBLIC__/home/images/upload-positive.png) no-repeat center;background-size:contain;">';
    str += '<input type="file" id="firmimg'+Math.round(Math.random()*1000)+'" name="up_pic" onchange="uploadImg(this,upload_img_back)"/>';
    str += '<input type="hidden" name="firmimg[]" value=""/>';
    str += '</div>';
    str += '</div>';
	str += '</div>';
	$(obj).before(str)
}
function add_ginvestor(obj){
	var str = '';
	str += '<div name="ginvestor_add">';
	str += '<div class="flex-justify" style="width:100%;height:0.75rem;background:#eee">';
	str += '<div style="margin-left:0.3rem;font-weight:bold;">投资人信息</div>';
	str += '<div style="width:0.75rem;text-align:center;color:#feb83d;font-size:0.65rem;" onclick="$(this).parents(\'div[name=ginvestor_add]\').remove()">-</div>';
	str += '</div>';
    str += '<section class="flex-align">';
    str += '<span>投资人姓名</span>';
   	str += '<input type="text" class="flex-1" name="ginvestorname[]" placeholder="请输入投资人姓名"/>';
    str += '</section>';
    str += '<section class="flex-align">';
    str += '<span>出资额</span>';
    str += '<input type="text" class="flex-1" name="oneginvestormon[]" placeholder="请输入出资额"/>';
    str += '</section>';
    str += '<section class="flex-align proportion">';
    str += '<span>出资比例</span>';
    str += '<input type="text" class="flex-1" name="oneginvestorscale[]" placeholder="请输入出资比例，例如：30"/>';
    str += '<span>%</span>';
    str += '</section>';
    str += '<section class="flex-align identity">';
    str += '<span>身份证明</span>';
    str += '</section>';
    str += '<div class="identity-upload clearfix">';
    str += '<div style="background:url(__PUBLIC__/home/images/upload-positive.png) no-repeat center;background-size:contain;">';
    str += '<input type="file" id="ginvestorimg'+Math.round(Math.random()*1000)+'" name="up_pic" onchange="uploadImg(this,upload_img_back)"/>';
    str += '<input type="hidden" name="ginvestorimg[]" value=""/>';       
    str += '</div>';
    str += '<div style="background:url(__PUBLIC__/home/images/upload-other-side.png) no-repeat center;background-size:contain;">';
    str += '<input type="file" id="bginvestorimg'+Math.round(Math.random()*1000)+'" name="up_pic" onchange="uploadImg(this,upload_img_back)"/>';
    str += '<input type="hidden" name="bginvestorimg[]" value=""/>';
    str += '</div>';
    str += '</div>';
	str += '</div>';
	$(obj).before(str)
}
function add_gfirm(obj){
	var str = '';
	str += '<div name="gfirm_add">';
	str += '<div class="flex-justify" style="width:100%;height:0.75rem;background:#eee">';
	str += '<div style="margin-left:0.3rem;font-weight:bold;">投资企业信息</div>';
	str += '<div style="width:0.75rem;text-align:center;color:#feb83d;font-size:0.65rem;" onclick="$(this).parents(\'div[name=gfirm_add]\').remove()">-</div>';
	str += '</div>';
    str += '<section class="flex-align">';
    str += '<span>投资企业名称</span>';
    str += '<input type="text" class="flex-1" name="gfirmname[]" placeholder="请输入投资企业名称"/>';
    str += '</section>';
    str += '<section class="flex-align">';
    str += '<span>出资额</span>';
    str += '<input type="text" class="flex-1" name="onegfirmmon[]" placeholder="请输入出资额"/>';
    str += '</section>';
    str += '<section class="flex-align proportion">';
    str += '<span>出资比例</span>';
    str += '<input type="text" class="flex-1" name="onegfirmscale[]" placeholder="请输入出资比例，例如：30"/>';
    str += '<span>%</span>';
    str += '</section>';
    str += '<section class="flex-align identity">';
    str += '<span>证件照<i></i></span>';
    str += '</section>';
    str += '<div class="identity-upload clearfix">';
    str += '<div style="background:url(__PUBLIC__/home/images/upload-positive.png) no-repeat center;background-size:contain;">';
   	str += '<input type="file" id="gfirmimg'+Math.round(Math.random()*1000)+'" name="up_pic" onchange="uploadImg(this,upload_img_back)"/>';
    str += '<input type="hidden" name="gfirmimg[]" value=""/>';
    str += '</div>';
    str += '</div>';
	str += '</div>';
	$(obj).before(str);
}

</script>
</div>